www.gusucode.com > 星梦奇缘交友网 1 > 星梦奇缘交友网 1.0源码程序/love/leaveword/showword.asp
<!-- #include file="config.asp" --> <!-- #include file="style.asp" --> <!-- #include file="md5.asp" --> <% Response.Expires = -1 Response.AddHeader "Pragma","no-cache" Response.AddHeader "cache-control","no-cache, must-revalidate" if isbanip(Request.ServerVariables("REMOTE_ADDR"))=true or isbanip(Request.ServerVariables("HTTP_X_FORWARDED_FOR"))=true then Response.Write "<html><head><meta http-equiv=refresh content=0;url=err.asp?number=1></head></html>" Response.End elseif StatusOpen=false then Response.Write "<html><head><meta http-equiv=refresh content=0;url=err.asp?number=2></head></html>" Response.End end if %> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title><%=HomeName%> 留言本</title></head><body<%=bodylimit%> onload="<%=framecheck%>if(document && document.form5 && document.form5.ipass)document.form5.ipass.focus();"> <script language="JavaScript"> <!-- function searchsubmitcheck() { if (form1.searchtxt.value=='') {alert('请输入搜索内容!');form1.searchtxt.focus();return false;} form1.searchsubmit.disabled=true; return true; } //--> </script> <% function getip(byval sip ,byval PosCount) dim t_str,t_char,t_count t_str="" t_count=0 for ii=1 to len(sip) if t_count=PosCount then exit for t_char=mid(sip,ii,1) if isnumeric(t_char) then t_str=t_str & t_char else t_str=t_str & "." t_count=t_count+1 end if next if right(t_str,1)="." then t_str=left(t_str,len(t_str)-1) for ii=1 to 4-PosCount t_str=t_str & ".*" next getip=t_str end function '<ShowArticle> Dim cn,rs,ItemsCount set cn=server.CreateObject("ADODB.Connection") set rs=server.CreateObject("ADODB.Recordset") CreateConn cn,dbtype rs.Open "SELECT COUNT(id) FROM main",cn,,,1 ItemsCount=rs(0) rs.Close %> <div align="<%=TableAlign%>"> <table border="<%=TableBorderWidth%>" cellpadding="2" style="border-collapse:collapse" width="<%=TableWidth%>" bordercolor="<%=TableBorderColor%>"><tr><td> <%if ShowTitle=true then%> <table border="0" cellpadding="2" style="border-collapse: collapse" width="100%"> <tr height="60" bgcolor="<%=TitleBGC%>"> <td background="<%=TitlePic%>" class="booktitle"> <% if HomeLogo<>"" then Response.Write "<img border=0 src=" &HomeLogo& ">" if HomeName<>"" then if HomeAddr<>"" then Response.Write "<a href=""" &HomeAddr& """ class=""booktitle"">" &HomeName& "</a>" else Response.Write HomeName end if Response.Write " >> " end if Response.Write "<a href=""index.asp"" class=""booktitle"">留言本</a> >> 查看加密的留言" %> </td> </tr> </table> <br> <%end if%> <table border="0" width="100%"> <tr><td align="left"> <%if StatusWrite=true then%><a href="leaveword.asp" title="签写留言"><img src="image/icon_write.gif" border="0">签写留言</a><%end if%> </td><td align="right"> <font color="<%=LinkNormal%>">| </font><a href="admin_login.asp">管理</a> </td></tr> </table> <!-- #include file="topbulletin.inc" --> <% dim showbox,showstr showbox=true showstr="" if Request.Form("submitted")<>"1" then showbox=true elseif VcodeCount>0 and (Request.Form("ivcode")<>session("vcode") or session("vcode")="") then showbox=true showstr="验证码错误。" else if isnumeric(Request.Form("id"))=false or Request.Form("id")="" then showbox=true showstr="留言不存在。" elseif Request.Form("ipass")="" then showbox=true showstr="密码不正确。" else rs.Open "SELECT * FROM main WHERE id=" & Request.Form("id"),cn,,,1 if rs.EOF=true then showbox=true showstr="留言不存在。" elseif clng(rs("guestflag") and 16)<>0 then showbox=true showstr="留言尚未通过审核。" elseif clng(rs("guestflag") and 32)=0 or clng(rs("guestflag") and 64)=0 then showbox=true showstr="此留言非加密悄悄话。" elseif md5(Request.Form("ipass"),16)<>rs("whisperpwd") then showbox=true showstr="密码不正确。" else showbox=false end if end if end if if VcodeCount>0 and showbox=true then if rs.State=1 then rs.Close 'Const adStateOpen = &H00000001 session("vcode")=getvcode(VcodeCount) else session("vcode")="" end if %> <%if showbox=true then%> <br> <table border="1" cellpadding="2" style="border-collapse:collapse" width="236" bordercolor="<%=TableBorderColor%>" align="center"> <tr height="25" align="center"> <td background="<%=TableTitlePic%>" bgcolor="<%=TableTitleBGC%>"><font color="<%=TableTitleColor%>"><b>已加密留言的验证</b></font></td> </tr> <tr><td bgcolor="<%=TableContentBGC%>" align="center"> <br> <form method="post" action="showword.asp" name="form5" onsubmit="if(this.ipass.value==''){alert('请输入密码!');this.ipass.focus();return false;} else if(this.ivcode && this.ivcode.value==''){alert('请输入验证码!');this.ivcode.focus(); return false;} else this.submit1.disabled=true;"> <input type="hidden" name="id" value="<%=request("id")%>"> <input type="hidden" name="submitted" value="1"> <table border="0" cellpadding="2" cellspacing="0" align="center"> <tr> <td> <font color="<%=TableContentColor%>">密 码:</font> </td> <td> <input type="password" name="ipass" size="26" maxlength="16"> </td> </tr> <%if VcodeCount>0 then%> <tr><td height="10"></td></tr> <tr> <td> <font color="<%=TableContentColor%>">验证码:</font> </td> <td> <input type="text" name="ivcode" size="10"> <img src="show_vcode.asp"> </td> </tr> <%end if%> <tr><td height="15"></td></tr> <tr> <td align="center" colspan="2"> <input value="确定" type="submit" name="submit1"> </td> </tr> </table> </form> </td></tr> </table> <%if showstr<>"" then Response.Write "<br><span style=""width:100%; text-align:center"">" &showstr& "</span>"%> <%else dim ItemsPerPage,pagename ItemsPerPage=1 pagename="showword"%> <!-- #include file="listword_guest.inc" --> <%rs.Close%> <%end if%> <br> <table border="0" width="100%"> <tr><td align="left"> <%if StatusWrite=true then%><a href="leaveword.asp" title="签写留言"><img src="image/icon_write.gif" border="0">签写留言</a><%end if%> </td><td align="right"> <font color="<%=LinkNormal%>">| </font><a href="admin_login.asp">管理</a> </td></tr> </table> <%if StatusSearch=true and ItemsCount>0 then%> <br> <table border="1" cellpadding="2" style="border-collapse:collapse" width="100%" bordercolor="<%=TableBorderColor%>"> <tr height="25" align="center"> <td background="<%=TableTitlePic%>" bgcolor="<%=TableTitleBGC%>"><font color="<%=TableTitleColor%>"><b>[留言搜索]</b></font></td> </tr> <tr><td bgcolor="<%=TableContentBGC%>" align="center"><font color="<%=TableContentColor%>"> <br> <form method="post" action="search.asp" name="form1" onsubmit="return searchsubmitcheck();"> 搜索:<input type="text" name="searchtxt" size="<%=SearchTextWidth%>"> <input type="submit" value="搜索" name="searchsubmit"> <select name="type" size="1" onchange="searchtxt.focus();"> <option value="name">按姓名搜索</option> <option value="title">按标题搜索</option> <option value="article" selected>按留言内容搜索</option> <option value="reply">按回复内容搜索</option> </select></form> </font></td></tr> </table> <%end if%> </td></tr></table></div> <% cn.Close set rs=nothing set cn=nothing '</ShowArticle> %> <!-- #include file="bottom.asp" --> </body></html>